//
// CPSParticle.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CPSParticle extends CPSLocatedBindable {
  private long swigCPtr;

  public CPSParticle(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CPSParticle_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSParticle obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSParticle(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public long getType() {
    return nel3dJNI.CPSParticle_getType(swigCPtr, this);
  }

  public long getPriority() {
    return nel3dJNI.CPSParticle_getPriority(swigCPtr, this);
  }

  public boolean hasParticles() {
    return nel3dJNI.CPSParticle_hasParticles(swigCPtr, this);
  }

  public void step(TPSProcessPass pass) {
    nel3dJNI.CPSParticle_step(swigCPtr, this, pass.swigValue());
  }

  public boolean hasTransparentFaces() {
    return nel3dJNI.CPSParticle_hasTransparentFaces(swigCPtr, this);
  }

  public boolean hasOpaqueFaces() {
    return nel3dJNI.CPSParticle_hasOpaqueFaces(swigCPtr, this);
  }

  public boolean hasLightableFaces() {
    return nel3dJNI.CPSParticle_hasLightableFaces(swigCPtr, this);
  }

  public boolean usesGlobalColorLighting() {
    return nel3dJNI.CPSParticle_usesGlobalColorLighting(swigCPtr, this);
  }

  public void enableGlobalColorLighting(boolean enabled) {
    nel3dJNI.CPSParticle_enableGlobalColorLighting(swigCPtr, this, enabled);
  }

  public boolean supportGlobalColorLighting() {
    return nel3dJNI.CPSParticle_supportGlobalColorLighting(swigCPtr, this);
  }

  public void draw(boolean opaque) {
    nel3dJNI.CPSParticle_draw(swigCPtr, this, opaque);
  }

  public void showTool() {
    nel3dJNI.CPSParticle_showTool(swigCPtr, this);
  }

  public long getNumWantedTris() {
    return nel3dJNI.CPSParticle_getNumWantedTris(swigCPtr, this);
  }

  public void serial(IStream f) {
    nel3dJNI.CPSParticle_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public void disableAutoLOD(boolean disable) {
    nel3dJNI.CPSParticle_disableAutoLOD__SWIG_0(swigCPtr, this, disable);
  }

  public void disableAutoLOD() {
    nel3dJNI.CPSParticle_disableAutoLOD__SWIG_1(swigCPtr, this);
  }

  public boolean isAutoLODDisabled() {
    return nel3dJNI.CPSParticle_isAutoLODDisabled(swigCPtr, this);
  }

  public void setZBias(float value) {
    nel3dJNI.CPSParticle_setZBias(swigCPtr, this, value);
  }

  public float getZBias() {
    return nel3dJNI.CPSParticle_getZBias(swigCPtr, this);
  }

}
